package com.huiyuan.domain;

import lombok.Builder;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @author huiyuan080
 * @data 2023/5/2
 * @apiNote
 */
@Builder
public class Order implements Serializable {
    /**
    * 订单id
    */
    private Integer id;

    /**
    * 用户id
    */
    private Integer userId;

    /**
    * 车辆id
    */
    private Integer bikeId;

    /**
    * 开始租车时间
    */
    private Date createTime;

    /**
    * 还车时间
    */
    private Date endTime;

    /**
    * 租车金额 
    */
    private BigDecimal price;

    private static final long serialVersionUID = 1L;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getBikeId() {
        return bikeId;
    }

    public void setBikeId(Integer bikeId) {
        this.bikeId = bikeId;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", userId=").append(userId);
        sb.append(", bikeId=").append(bikeId);
        sb.append(", createTime=").append(createTime);
        sb.append(", endTime=").append(endTime);
        sb.append(", price=").append(price);
        sb.append("]");
        return sb.toString();
    }
}